<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs for page builder.func.php</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="file-name">/includes/builder_functions/builder.func.php</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
									<a href="#sec-includes">Includes</a>
			|											<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">	
		<!-- ========== Info from phpDoc block ========= -->
		
			</div>
</div>
		

	<a name="sec-includes"></a>	
	<div class="info-box">
		<div class="info-box-title">Includes</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Includes</span>
			|													<a href="#sec-functions">Functions</a>
					</div>
		<div class="info-box-body">	
			<a name="_Config::base_path_Config::html_func_path_html_php"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name">Config::base_path.Config::html_func_path."html.php"</span>)
			(line <span class="line-number">31</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_/var/www/gde-1_0/htdocs/config_php"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name">'/var/www/gde-1.0/htdocs/config.php'</span>)
			(line <span class="line-number">25</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_Config::base_path_Config::adodb_path_adodb-exceptions_inc_php"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name">Config::base_path.Config::adodb_path.'adodb-exceptions.inc.php'</span>)
			(line <span class="line-number">29</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
<a name="_Config::base_path_Config::database_path_database_php"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="include-title">
			<span class="include-type">include_once</span>
			(<span class="include-name"><a href="../default/_includes_database_database_php.html">database.php</a></span>)
			(line <span class="line-number">27</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	
</div>
		</div>
	</div>
	
	
	
	<a name="sec-functions"></a>	
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-includes">Includes</a>
				|												<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">	
			<a name="functionbuildDatabaseQuery" id="functionbuildDatabaseQuery"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">buildDatabaseQuery</span> (line <span class="line-number">57</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">buiildDatabaseQuery - queries for available databases, displays a select box, and begins building  the query off this information.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			buildDatabaseQuery
		</span>
				()
			</div>

		
	
</div>
<a name="functionbuildFieldQuery" id="functionbuildFieldQuery"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">buildFieldQuery</span> (line <span class="line-number">129</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">buildFieldQuery - queries for fields of selected database,selected tables, prints them in select box  and completes the query string built by the user.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			buildFieldQuery
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$selectedDatabase</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$selectedTable</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$selectedDatabase</span><span class="var-description">: - database selected by user</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$selectedTable</span><span class="var-description">: - table selected by user</span>			</li>
				</ul>
		
	
</div>
<a name="functionbuildInnerJoins" id="functionbuildInnerJoins"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">buildInnerJoins</span> (line <span class="line-number">496</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">For each selected table in the query builder, &quot;buildInnerJoins&quot; will query the pk and fk tables  maintained by GDE to build an html talbe that will present all primary and foreign key relationships  as well as where clauses to be passed to the query editor.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			buildInnerJoins
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$selectedDatabase</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$selectedTables</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$selectedDatabase</span><span class="var-description">: - $_SESSION['selected_database'] variable containing users selected  databases created by query builder</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$selectedTables</span><span class="var-description">: - $_SESSION['selected_tables'] array containing users selected tables  created by the query builder</span>			</li>
				</ul>
		
	
</div>
<a name="functionbuildQueryString" id="functionbuildQueryString"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">buildQueryString</span> (line <span class="line-number">193</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">buildQueryString - parses $_session and $_post globals to build a query string based on the user</p>
<p class="description"><p>selected fields</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> - query string</li>
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			buildQueryString
		</span>
				()
			</div>

		
	
</div>
<a name="functionbuildTableQuery" id="functionbuildTableQuery"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">buildTableQuery</span> (line <span class="line-number">93</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">buiilTableQuery - queries for tables based on selected database, prints a select box, and continues</p>
<p class="description"><p>to build query from user selected information</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			buildTableQuery
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$selectedDatabase</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$selectedDatabase</span><span class="var-description">: - database user chooses to view tables</span>			</li>
				</ul>
		
	
</div>
<a name="functionget_database_fk" id="functionget_database_fk"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">get_database_fk</span> (line <span class="line-number">408</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">get_database_fk() - Reviews all databases managed by GDE, taking each table from each database exlcluding</p>
<p class="description"><p>system databases and finding all foreign keys in each table. Foreign keys are inserted in a table  concatenated with the database name &quot;BDAP_'.$result-&gt;fields[0].'_tables_fk&quot; and makes a relationship to  its primary key table partner, see get_database_pk()</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			get_database_fk
		</span>
				()
			</div>

		
	
</div>
<a name="functionget_database_pk" id="functionget_database_pk"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">get_database_pk</span> (line <span class="line-number">311</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">get_database_pk() - Searches for all databases managed by GDE excluding system databses  locating all primary key and puting them in a talbe with the database name appended to  &quot;`BDAP_'.$result-&gt;fields[0].'_tables_pk`&quot;</p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			get_database_pk
		</span>
				()
			</div>

		
	
</div>
<a name="functionmaxListMultiple" id="functionmaxListMultiple"><!-- --></a>
<div class="oddrow">
	
	<div>
		<span class="method-title">maxListMultiple</span> (line <span class="line-number">40</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">maxListMultiple - returns the maximum number of options in a multiselect box</p>
	<ul class="tags">
				<li><span class="field">return:</span> - maximum for a multiselect box</li>
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			maxListMultiple
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$num_records</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$num_records</span><span class="var-description">: - number of records returned from a result set  best found by using adodb's RecordCount</span>			</li>
				</ul>
		
	
</div>
<a name="functionqueryEditor" id="functionqueryEditor"><!-- --></a>
<div class="evenrow">
	
	<div>
		<span class="method-title">queryEditor</span> (line <span class="line-number">278</span>)
	</div> 

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">queryEditor - displays the query editor with the user built query string with options</p>
	<ul class="tags">
				<li><span class="field">author:</span> Demetrios Dimatos</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			queryEditor
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$query_string</span>)
			</div>

			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$query_string</span><span class="var-description">: - query string to be displayed by default in the qeury editor.</span>			</li>
				</ul>
		
	
</div>
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Fri, 20 Oct 2006 00:33:14 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>